package com.teradyne.phoenix.client.activities;

import com.google.gwt.activity.shared.AbstractActivity;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.place.shared.PlaceController;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.AcceptsOneWidget;
import com.teradyne.phoenix.client.factory.AppFactory;
import com.teradyne.phoenix.client.locale.AppLocale;
import com.teradyne.phoenix.client.views.RolesView;
import com.teradyne.phoenix.shared.PhoenixServiceAsync;

public class RolesActivity extends AbstractActivity implements RolesView.Presenter {

	private final PhoenixServiceAsync rpcService;
	private final EventBus eventBus;
	private final RolesView display;

	private PlaceController placeController;

	private AppLocale appLocale;

	public RolesActivity(AppFactory appFactory) {
		this.rpcService = appFactory.getPhoenixService();
		this.eventBus = appFactory.getEventBus();
		this.display = appFactory.getRolesView();
		this.placeController = appFactory.getPlaceController();
		this.appLocale = appFactory.getAppLocale();
		
	}

	@Override
	public void start(AcceptsOneWidget container, EventBus eventBus) {
		container.setWidget(display.asWidget());
		display.setPresenter(this);
	}

	@Override
	public void createButtonHandler() {
		Window.alert("Roles Create!");
	}

	@Override
	public void updateButtonHandler() {
		Window.alert("Roles Update!");
	}

	@Override
	public void deleteButtonHandler() {
		Window.alert("Roles Delete!");
	}
}
